<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8" />
	<meta name="wap-font-scale" content="no">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
	<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"
	/>
	<title>详情</title>
	<meta name="keywords" content="e校园">
	<meta name="description" content="e校园">
	<link href="css/content.min.css" rel="stylesheet" type="text/css">
	<link href="css/style.css" rel="stylesheet" type="text/css">
</head>

<body>
	<div class="main" id="con"></div>
	<div id="null-box"></div>
</body>
<script src="script/jquery.min.js"></script>
<script src="script/jquery.lazyload.js"></script>
<script src="script/crypto-js.js"></script>
<script src="script/md5.js" type="text/javascript"></script> 
<script src="script/common.js"></script>
<script src="script/myAjax.js"></script>

<script>
	function init() {
		try {
			// console.log(12);
			window.vipObj = vipObj; // 全局下面设置vipObj 方法
		} catch (error) {
			// 
		}
	}
	init();

	$(function () {
		var id = getQueryString("articleId");
		getJumpInfo(id);
	});
	// http://test.family.juziwl.cn/family/scholar/listForHomePage
	function getJumpInfo(id) {
		var data = {"articleId": id };
		
		myAjax("post", ARI_API + "/family/ecampus/getCampusArticle", setHtml, data)
	}

	

	function setHtml(data) {
		if(!data|| data == null) {
			var info=$('<p class="null-img"></p><span class="text">该文章已经被删除了...</span>');
			$('#null-box').append(info); 
			return;
		}
		// console.log(data,'datattattt');
		var title = data.sName;
		var update = data.sCreateTime;
		var author = data.sPublisher;
		var content = data.sHtml;
		var sLink = data.sLink;
		if(content) {
			content = content.replace(/[^-]src=[\'\"]?([^\'\"]*)[\'\"]?/ig,' src="" ');
			content = unescape(content&&content.replace(/\u/g, "u"));  
			var conInfo = $('<div class="art01"><div class="header"><div class="art-title">' + title + '</div><p>' + update + '<span>' + (author || '') + '</span></p></div><div class="ab-con panel-body">' + content + '</div></div>');
			$('#con').append(conInfo);
		}
		setImageHeight();
		// document.title = title;
	}
	
	$(window).on('resize',setImageHeight)
	function setImageHeight(){
		var $wscnph = $('.wscnph').add($('img[data-layer="photo"]'));
		$wscnph.each(function(){
			var parentW = $(this).parent().width();
			var orginW = $(this).data('w') || $(this).width();
			var ratio = $(this).data('ratio');
			if(orginW >= parentW) {
				var iHeight = parentW / ratio;
				$(this).width('100%');
				$(this).height(ratio ? iHeight: 'auto');
			}
			else {
				$(this).width(orginW);
				$(this).height(orginW/ratio);
			}
		});
		lazyImage();
	}
	function lazyImage() {
		$('img.img-loading').add('img').lazyload({ threshold :30,'data_attribute': 'mce-src'});	
	}

	

</script>

</html>